from sqlalchemy import Column, BigInteger, String, Integer, DateTime, Text, Numeric, Date, UniqueConstraint
from sqlalchemy.orm import declarative_base


Base = declarative_base()


class User(Base):
    __tablename__ = 'platform_user_info'
    id = Column(BigInteger, primary_key=True, autoincrement=True)
    user_name = Column(String(100), nullable=False)
    person_name = Column(String(255), nullable=True)
    salt = Column(String(255), nullable=False)
    salted_password = Column(String(255), nullable=False)
    role_type = Column(Integer, default=0)
    views = Column(Text)
    upload_time = Column(DateTime)
    create_time = Column(DateTime)
    def tran_to_dict(self) -> dict:
        return {
            'id': str(self.id),
            'personName': str(self.person_name) if self.person_name else '',
            'userName': str(self.user_name),
            'roleType': str(self.role_type),
            'views': str(self.views) if self.views else '[]'
        }

class PlatformView(Base):
    __tablename__ = 'platform_view_info'
    id = Column(BigInteger, primary_key=True, autoincrement=True)
    view_url = Column(String(255), nullable=False)
    view_name = Column(String(255), nullable=False)
    parent_id = Column(BigInteger, nullable=False)
    is_menu = Column(Integer, nullable=False)
    order_key = Column(Integer, nullable=False)
    def tran_to_dict(self) -> dict:
        return {
            'id': str(self.id),
            'url': str(self.view_url),
            'name': str(self.view_name),
            'parentId': str(self.parent_id),
            'type': str(self.is_menu),
            'orderKey': str(self.order_key)
        }


class LogSearchPriceExe(Base):
    __tablename__ = 'log_search_price_exe'
    search_time = Column(DateTime, primary_key=True)
    search_user_id = Column(BigInteger, primary_key=True)
    search_user_name = Column(String(255), nullable=False)
    param_delivery_price = Column(Numeric(10, 2))
    param_code_package_num = Column(String(255))
    result_delivery_price = Column(String(255))
    result_total_package_num = Column(String(255))
    result_total_promotion_base_price = Column(String(255))
    result_total_billing = Column(String(255))
    result_total_day_promotion_base_price = Column(String(255))
    result_total_piece_num = Column(String(255))
    result_total_gift_cost = Column(String(255))
    result_discount_rate = Column(String(255))
    result_is_lower_promotion_price = Column(String(255))
    result_is_lower_promotion_day_price = Column(String(255))
    result_piece_price = Column(String(255))
    result_gift_rate = Column(String(255))
    def tran_to_dict(self) -> dict:
        return {
            "查询时间": self.search_time.strftime('%Y-%m-%d %H:%M:%S'),
            "查询人姓名": self.search_user_name,
            "查询到手价": self.param_delivery_price,
            "产品代码与包数": self.param_code_package_num,
            "到手价": self.result_delivery_price,
            "总包数合计": self.result_total_package_num,
            "总大促底价合计": self.result_total_promotion_base_price,
            "总开单合计": self.result_total_billing,
            "总日促底价合计": self.result_total_day_promotion_base_price,
            "总片数合计": self.result_total_piece_num,
            "总赠品成本合计": self.result_total_gift_cost,
            "折扣费率": self.result_discount_rate,
            "是否破大促价": self.result_is_lower_promotion_price,
            "是否破日促价": self.result_is_lower_promotion_day_price
        }


# 定义 ORM 类
class creativity_promotion_creativity_kind(Base):
    __tablename__ = 'creativity_promotion_creativity_kind'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    creativity_promotion_channel =Column(String(3), nullable=False)
    creativity_kind =Column(String(100), nullable=False)
    __table_args__ = (UniqueConstraint( 'creativity_promotion_channel', 'creativity_kind'),)


class tmall_flag_competing_store_list(Base):
    __tablename__ = 'tmall_flag_competing_store_list'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    competing_store_name =Column(String(50), nullable=False)
    __table_args__ = (UniqueConstraint( 'competing_store_name'),)


class competing_brand_list(Base):
    __tablename__ = 'competing_brand_list'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    competing_brand_name =Column(String(50), nullable=False)
    __table_args__ = (UniqueConstraint( 'competing_brand_name'),)


class big_promotion_duration(Base):
    __tablename__ = 'big_promotion_duration'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    big_promotion_name =Column(String(50), nullable=False)
    big_promotion_year =Column(Integer, nullable=False)
    big_promotion_begin_date =Column(Date, nullable=False)
    big_promotion_end_date =Column(Date, nullable=False)
    big_promotion_sto_begin_date =Column(Date, nullable=False)
    big_promotion_sto_end_date =Column(Date, nullable=False)
    __table_args__ = (UniqueConstraint( 'big_promotion_name', 'big_promotion_year'),)


class good_product_code(Base):
    __tablename__ = 'good_product_code'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    product_code =Column(String(200), nullable=True)
    product_bar_code =Column(String(20), nullable=True)
    product_name =Column(String(200), nullable=True)


class good_product_combination(Base):
    __tablename__ = 'good_product_combination'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    product_combination =Column(String(500), nullable=True)
    sixty_nine_code =Column(String(20), nullable=True)
    product_code =Column(String(200), nullable=True)
    product_bar_code =Column(String(20), nullable=True)
    product_num =Column(Integer, nullable=True)


class good_product_price(Base):
    __tablename__ = 'good_product_price'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    product_series =Column(String(50), nullable=True)
    product_code =Column(String(200), nullable=True)
    product_bar_code =Column(String(20), nullable=True)
    product_name =Column(String(100), nullable=True)
    product_pack_pieces =Column(Integer, nullable=True)
    product_retail_price =Column(Numeric(10,2), nullable=True)
    product_initial_price =Column(Numeric(10,2), nullable=True)
    product_daily_sale_price =Column(Numeric(10,2), nullable=True)
    product_small_promotion_price =Column(Numeric(10,2), nullable=True)
    product_big_promotion_price =Column(Numeric(10,2), nullable=True)


class good_giveaway_item_price(Base):
    __tablename__ = 'good_giveaway_item_price'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    giveaway_item_code =Column(String(200), nullable=True)
    giveaway_item_bar_code =Column(String(20), nullable=True)
    giveaway_item_price_per_pack =Column(Numeric(10,2), nullable=True)
    giveaway_item_name =Column(String(200), nullable=True)


class good_indicator(Base):
    __tablename__ = 'good_indicator'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    sixty_nine_code =Column(String(20), nullable=False)
    good_series =Column(String(50), nullable=True)
    good_product_combination =Column(String(500), nullable=False)
    good_giveaway_item_combination =Column(String(500), nullable=True)
    good_giveaway_item_price =Column(Numeric(10,2), nullable=True)
    good_pack_count =Column(Integer, nullable=True)
    good_total_pieces =Column(Integer, nullable=True)
    good_retail_price =Column(Numeric(10,2), nullable=True)
    good_initial_price =Column(Numeric(10,2), nullable=True)
    good_giveaway_item_price_ratio =Column(Numeric(10,2), nullable=True)
    good_big_promotion_price =Column(Numeric(10,2), nullable=True)
    good_small_promotion_price =Column(Numeric(10,2), nullable=True)


class store_customer_manager(Base):
    __tablename__ = 'store_customer_manager'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    platform =Column(String(5), nullable=False)
    store_name =Column(String(10), nullable=False)
    customer_manager =Column(String(5), nullable=False)


class tmall_flagship_store_overview_day_input(Base):
    __tablename__ = 'tmall_flagship_store_overview_day_input'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    living_commission_rate =Column(Numeric(10,2), nullable=False)
    living_slot_cost =Column(Numeric(20,2), nullable=False)
    fake_order_amount =Column(Numeric(20,2), nullable=False)
    __table_args__ = (UniqueConstraint( 'stat_time'),)


class tmall_flagship_store_livestreamer_living_room_good_day_input(Base):
    __tablename__ = 'tmall_flagship_store_livestreamer_living_room_good_day_input'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    living_name =Column(String(50), nullable=False)
    living_streamer_name =Column(String(50), nullable=False)
    living_start_time =Column(DateTime, nullable=False)
    living_times_id =Column(String(20), nullable=False)
    living_good_id =Column(String(20), nullable=False)
    living_good_name =Column(String(50), nullable=False)
    living_good_cost_notes =Column(String(50), nullable=False)
    living_good_incl_tax_service_cost =Column(Numeric(20,2), nullable=False)
    living_good_mechanism =Column(String(20), nullable=False)
    living_good_commission_rate =Column(Numeric(10,2), nullable=False)
    __table_args__ = (UniqueConstraint( 'stat_time'),)


class dy_flagship_store_livestreamer_living_room_product_day_input(Base):
    __tablename__ = 'dy_flagship_store_livestreamer_living_room_product_day_input'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    livestreamer_name =Column(String(50), nullable=False)
    livestreamer_douyin_id =Column(String(20), nullable=False)
    living_start_time =Column(DateTime, nullable=False)
    living_good_id =Column(String(20), nullable=False)
    living_good_name =Column(String(50), nullable=False)
    living_good_service_cost =Column(Numeric(20,2), nullable=False)
    living_good_commission_rate =Column(Numeric(10,2), nullable=False)
    living_good_other_cost =Column(Numeric(20,2), nullable=False)
    living_good_level_one_cost_support =Column(Numeric(20,2), nullable=False)
    __table_args__ = (UniqueConstraint( 'stat_time'),)


class wxt_creativity_promotion_creativity_kind_input(Base):
    __tablename__ = 'wxt_creativity_promotion_creativity_kind_input'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    creativity_id =Column(String(20), nullable=False)
    creativity_image =Column(String(200), nullable=False)
    creativity_kind =Column(String(20), nullable=False)
    __table_args__ = (UniqueConstraint( 'creativity_id', 'creativity_image'),)


class pxb_creativity_promotion_creativity_kind_input(Base):
    __tablename__ = 'pxb_creativity_promotion_creativity_kind_input'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    creativity_id =Column(String(20), nullable=False)
    creativity_image =Column(String(200), nullable=False)
    creativity_kind =Column(String(20), nullable=False)
    __table_args__ = (UniqueConstraint( 'creativity_id', 'creativity_image'),)


class tmall_flagship_store_order_hour_temp(Base):
    __tablename__ = 'tmall_flagship_store_order_hour_temp'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(String(50), nullable=False)
    order_number =Column(String(30), nullable=False)
    order_creation_time =Column(DateTime, nullable=False)
    good_name =Column(String(50), nullable=False)
    good_id =Column(String(20), nullable=False)
    good_link =Column(String(200), nullable=False)
    good_main_image =Column(String(200), nullable=True)
    good_main_image_url =Column(String(1000), nullable=True)
    sixty_nine_code =Column(String(20), nullable=False)
    good_actual_price =Column(Numeric(10,2), nullable=False)
    good_trans_count =Column(Integer, nullable=False)


class tmall_flagship_store_goodrank_good_day(Base):
    __tablename__ = 'tmall_flagship_store_goodrank_good_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    good_id =Column(String(20), nullable=False)
    good_name =Column(String(50), nullable=False)
    good_number =Column(String(30), nullable=True)
    good_status =Column(String(20), nullable=True)
    good_label =Column(String(20), nullable=True)
    good_visitor_count =Column(Integer, nullable=True)
    good_view_count =Column(Integer, nullable=True)
    good_avg_stay_duration =Column(Numeric(10,2), nullable=True)
    good_details_bounce_rate =Column(Numeric(10,2), nullable=True)
    good_favorite_count =Column(Integer, nullable=True)
    good_add_to_cart_good_count =Column(Integer, nullable=True)
    good_add_to_cart_user_count =Column(Integer, nullable=True)
    good_order_buyer_count =Column(Integer, nullable=True)
    good_order_good_count =Column(Integer, nullable=True)
    good_order_amount =Column(Numeric(20,2), nullable=True)
    good_order_conversion_rate =Column(Numeric(10,2), nullable=True)
    good_payment_buyer_count =Column(Integer, nullable=True)
    good_payment_good_count =Column(Integer, nullable=True)
    good_payment_amount =Column(Numeric(20,2), nullable=True)
    good_payment_conversion_rate =Column(Numeric(10,2), nullable=True)
    good_payment_new_buyer_count =Column(Integer, nullable=True)
    good_payment_old_buyer_count =Column(Integer, nullable=True)
    good_payment_old_buyer_amount =Column(Numeric(20,2), nullable=True)
    good_payment_jhs_amount =Column(Numeric(20,2), nullable=True)
    good_avg_visitor_value =Column(Numeric(10,2), nullable=True)
    good_refund_amount =Column(Numeric(20,2), nullable=True)
    good_competitiveness_score =Column(Numeric(10,2), nullable=True)
    good_payment_year_accumulated_amount =Column(Numeric(20,2), nullable=True)
    good_payment_month_accumulated_amount =Column(Numeric(20,2), nullable=True)
    good_payment_month_accumulated_good_count =Column(Integer, nullable=True)
    good_search_guide_payment_conversion_rate =Column(Numeric(10,2), nullable=True)
    good_search_guide_visitor_count =Column(Integer, nullable=True)
    good_search_guide_payment_buyer_count =Column(Integer, nullable=True)
    good_structured_detail_guide_conversion_rate =Column(Numeric(10,2), nullable=True)
    good_structured_detail_guide_trans_share =Column(Numeric(10,2), nullable=True)


class tmall_flagship_store_goodrank_good_traffic_source_day(Base):
    __tablename__ = 'tmall_flagship_store_goodrank_good_traffic_source_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    good_id =Column(String(20), nullable=False)
    traffic_first_source =Column(String(20), nullable=False)
    traffic_second_source =Column(String(20), nullable=False)
    traffic_third_source =Column(String(20), nullable=False)
    visitor_count =Column(Integer, nullable=True)
    view_count =Column(Integer, nullable=True)
    payment_amount =Column(Numeric(20,2), nullable=True)
    view_share =Column(Numeric(10,2), nullable=True)
    internal_store_jump_user_count =Column(Integer, nullable=True)
    bounce_store_user_count =Column(Integer, nullable=True)
    favorite_user_count =Column(Integer, nullable=True)
    add_to_cart_user_count =Column(Integer, nullable=True)
    order_buyer_count =Column(Integer, nullable=True)
    order_conversion_rate =Column(Numeric(10,2), nullable=True)
    payment_good_count =Column(Integer, nullable=True)
    payment_buyer_count =Column(Integer, nullable=True)
    payment_conversion_rate =Column(Numeric(10,2), nullable=True)
    direct_payment_buyer_count =Column(Integer, nullable=True)
    favorite_payment_buyer_count =Column(Integer, nullable=True)
    follower_payment_buyer_count =Column(Integer, nullable=True)
    add_to_cart_payment_buyer_count =Column(Integer, nullable=True)


class tmall_flagship_store_homepage_overview_day(Base):
    __tablename__ = 'tmall_flagship_store_homepage_overview_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    payment_amount =Column(Numeric(20,2), nullable=True)
    visitor_count =Column(Integer, nullable=True)
    payment_conversion_rate =Column(Numeric(10,2), nullable=True)
    avg_order_price =Column(Numeric(10,2), nullable=True)
    refund_amount =Column(Numeric(20,2), nullable=True)
    ztc_promotion_cost =Column(Numeric(20,2), nullable=True)
    limf_promotion_cost =Column(Numeric(20,2), nullable=True)
    cjtj_promotion_cost =Column(Numeric(20,2), nullable=True)
    wxt_promotion_cost =Column(Numeric(20,2), nullable=True)
    zszw_promotion_cost =Column(Numeric(20,2), nullable=True)
    tk_promotion_cost =Column(Numeric(20,2), nullable=True)
    payment_buyer_count =Column(Integer, nullable=True)
    old_buyer_repurchase_rate =Column(Numeric(10,2), nullable=True)
    payment_old_buyer_count =Column(Integer, nullable=True)
    payment_old_buyer_amount =Column(Numeric(20,2), nullable=True)
    payment_suborder_count =Column(Integer, nullable=True)
    payment_good_count =Column(Integer, nullable=True)
    good_add_to_cart_user_count =Column(Integer, nullable=True)
    good_add_to_cart_good_count =Column(Integer, nullable=True)
    good_favorite_user_count =Column(Integer, nullable=True)
    view_count =Column(Integer, nullable=True)


class tmall_flagship_store_member_day(Base):
    __tablename__ = 'tmall_flagship_store_member_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    member_amount =Column(Numeric(20,2), nullable=True)
    new_member_count =Column(Integer, nullable=True)
    active_member_count =Column(Integer, nullable=True)
    member_trans_amount =Column(Numeric(20,2), nullable=True)
    member_trans_user_count =Column(Integer, nullable=True)
    member_avg_trans_price =Column(Numeric(10,2), nullable=True)
    member_get_exclusive_coupon_count =Column(Integer, nullable=True)
    member_use_exclusive_coupon_count =Column(Integer, nullable=True)
    member_exclusive_coupon_guide_trans_amount =Column(Numeric(20,2), nullable=True)
    new_member_get_exclusive_coupon_count =Column(Integer, nullable=True)
    new_member_use_exclusive_coupon_count =Column(Integer, nullable=True)
    new_member_exclusive_coupon_guide_trans_amount =Column(Numeric(20,2), nullable=True)


class tmall_flagship_store_traffic_source_all_day(Base):
    __tablename__ = 'tmall_flagship_store_traffic_source_all_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    flow_data_type =Column(String(20), nullable=False)
    traffic_first_source =Column(String(20), nullable=False)
    traffic_second_source =Column(String(20), nullable=False)
    traffic_third_source =Column(String(20), nullable=False)
    visitor_count =Column(Integer, nullable=True)
    visitor_count_mom =Column(Numeric(10,2), nullable=True)
    order_amount =Column(Numeric(20,2), nullable=True)
    order_amount_change =Column(Numeric(20,2), nullable=True)
    order_buyer_count =Column(Integer, nullable=True)
    order_buyer_count_change =Column(Integer, nullable=True)
    order_conversion_rate =Column(Numeric(10,2), nullable=True)
    order_conversion_rate_change =Column(Numeric(10,2), nullable=True)
    payment_amount =Column(Numeric(20,2), nullable=True)
    payment_amount_change =Column(Numeric(20,2), nullable=True)
    payment_buyer_count =Column(Integer, nullable=True)
    payment_buyer_count_change =Column(Integer, nullable=True)
    payment_conversion_rate =Column(Numeric(10,2), nullable=True)
    payment_conversion_rate_change =Column(Numeric(10,2), nullable=True)
    avg_order_price =Column(Numeric(10,2), nullable=True)
    avg_order_price_change =Column(Numeric(10,2), nullable=True)
    user_value =Column(Numeric(10,2), nullable=True)
    user_value_change =Column(Numeric(10,2), nullable=True)
    store_follow_buyer_count =Column(Integer, nullable=True)
    store_follow_buyer_count_change =Column(Integer, nullable=True)
    good_favorite_buyer_count =Column(Integer, nullable=True)
    good_favorite_buyer_count_change =Column(Integer, nullable=True)
    good_add_to_cart_user_count =Column(Integer, nullable=True)
    good_add_to_cart_user_count_change =Column(Integer, nullable=True)
    new_visitor_count =Column(Integer, nullable=True)
    new_visitor_count_change =Column(Integer, nullable=True)
    direct_payment_buyer_count =Column(Integer, nullable=True)
    good_favorite_payment_buyer_count =Column(Integer, nullable=True)
    follower_payment_buyer_count =Column(Integer, nullable=True)
    add_to_cart_payment_buyer_count =Column(Integer, nullable=True)
    store_page_guide_visitor_count =Column(Integer, nullable=True)
    store_page_guide_visitor_count_change =Column(Integer, nullable=True)
    short_video_guide_visitor_count =Column(Integer, nullable=True)
    good_guide_visitor_count =Column(Integer, nullable=True)
    Recommend_trans_user_count =Column(Integer, nullable=True)
    Recommend_trans_amount =Column(Numeric(20,2), nullable=True)
    ad_trans_amount =Column(Numeric(20,2), nullable=True)
    ad_trans_amount_change =Column(Numeric(20,2), nullable=True)
    ad_click_count =Column(Integer, nullable=True)
    ad_click_count_change =Column(Integer, nullable=True)


class tmall_flagship_store_traffic_source_new_customer_day(Base):
    __tablename__ = 'tmall_flagship_store_traffic_source_new_customer_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    flow_data_type =Column(String(20), nullable=False)
    traffic_first_source =Column(String(20), nullable=False)
    traffic_second_source =Column(String(20), nullable=False)
    traffic_third_source =Column(String(20), nullable=False)
    visitor_count =Column(Integer, nullable=True)
    good_favorite_user_count =Column(Integer, nullable=True)
    good_add_to_cart_user_count =Column(Integer, nullable=True)
    payment_buyer_count =Column(Integer, nullable=True)
    payment_amount =Column(Numeric(20,2), nullable=True)
    payment_conversion_rate =Column(Numeric(10,2), nullable=True)
    avg_order_price =Column(Numeric(10,2), nullable=True)
    user_value =Column(Numeric(10,2), nullable=True)


class tmall_flagship_store_traffic_source_old_customer_day(Base):
    __tablename__ = 'tmall_flagship_store_traffic_source_old_customer_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    flow_data_type =Column(String(20), nullable=False)
    traffic_first_source =Column(String(20), nullable=False)
    traffic_second_source =Column(String(20), nullable=False)
    traffic_third_source =Column(String(20), nullable=False)
    visitor_count =Column(Integer, nullable=True)
    good_favorite_user_count =Column(Integer, nullable=True)
    good_add_to_cart_user_count =Column(Integer, nullable=True)
    payment_buyer_count =Column(Integer, nullable=True)
    payment_amount =Column(Numeric(20,2), nullable=True)
    payment_conversion_rate =Column(Numeric(10,2), nullable=True)
    avg_order_price =Column(Numeric(10,2), nullable=True)
    user_value =Column(Numeric(10,2), nullable=True)


class tmall_flagship_store_traffic_source_member_day(Base):
    __tablename__ = 'tmall_flagship_store_traffic_source_member_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    flow_data_type =Column(String(20), nullable=False)
    traffic_first_source =Column(String(20), nullable=False)
    traffic_second_source =Column(String(20), nullable=False)
    traffic_third_source =Column(String(20), nullable=False)
    visitor_count =Column(Integer, nullable=True)
    good_favorite_user_count =Column(Integer, nullable=True)
    good_add_to_cart_user_count =Column(Integer, nullable=True)
    payment_buyer_count =Column(Integer, nullable=True)
    payment_amount =Column(Numeric(20,2), nullable=True)
    payment_conversion_rate =Column(Numeric(10,2), nullable=True)
    avg_order_price =Column(Numeric(10,2), nullable=True)
    user_value =Column(Numeric(10,2), nullable=True)


class tmall_flagship_competing_store_traffic_source_day(Base):
    __tablename__ = 'tmall_flagship_competing_store_traffic_source_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    competing_store_name =Column(String(50), nullable=False)
    traffic_first_source =Column(String(20), nullable=False)
    traffic_second_source =Column(String(20), nullable=False)
    traffic_third_source =Column(String(20), nullable=False)
    trans_amount =Column(Numeric(20,2), nullable=True)
    visitor_count =Column(Integer, nullable=True)
    payment_user_count =Column(Integer, nullable=True)
    payment_conversion_rate =Column(Numeric(10,2), nullable=True)
    avg_order_price =Column(Numeric(10,2), nullable=True)
    user_value =Column(Numeric(10,2), nullable=True)


class tmall_flagship_store_wxt_promotion_day(Base):
    __tablename__ = 'tmall_flagship_store_wxt_promotion_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    impression_count =Column(Integer, nullable=True)
    click_count =Column(Integer, nullable=True)
    cost =Column(Numeric(10,2), nullable=True)
    click_through_rate =Column(Numeric(10,2), nullable=True)
    cost_per_click =Column(Numeric(10,2), nullable=True)
    impression_cpm =Column(Numeric(10,2), nullable=True)
    total_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    total_presale_trans_order_count =Column(Integer, nullable=True)
    direct_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    direct_presale_trans_order_count =Column(Integer, nullable=True)
    indirect_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    indirect_presale_trans_order_count =Column(Integer, nullable=True)
    direct_trans_amount =Column(Numeric(20,2), nullable=True)
    indirect_trans_amount =Column(Numeric(20,2), nullable=True)
    total_trans_amount =Column(Numeric(20,2), nullable=True)
    total_trans_order_count =Column(Integer, nullable=True)
    direct_trans_order_count =Column(Integer, nullable=True)
    indirect_trans_order_count =Column(Integer, nullable=True)
    click_conversion_rate =Column(Numeric(10,2), nullable=True)
    input_output_ratio =Column(Numeric(10,2), nullable=True)
    total_trans_cost =Column(Numeric(20,2), nullable=True)
    total_good_add_to_cart_count =Column(Integer, nullable=True)
    direct_good_add_to_cart_count =Column(Integer, nullable=True)
    indirect_good_add_to_cart_count =Column(Integer, nullable=True)
    add_to_cart_rate =Column(Numeric(10,2), nullable=True)
    good_favorite_count =Column(Integer, nullable=True)
    store_favorite_count =Column(Integer, nullable=True)
    store_favorite_cost =Column(Numeric(20,2), nullable=True)
    total_favorite_and_add_to_cart_count =Column(Integer, nullable=True)
    total_favorite_and_add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    good_favorite_and_add_to_cart_count =Column(Integer, nullable=True)
    good_favorite_and_add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    total_favorite_count =Column(Integer, nullable=True)
    good_favorite_cost =Column(Numeric(20,2), nullable=True)
    good_favorite_rate =Column(Numeric(10,2), nullable=True)
    add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    order_count =Column(Integer, nullable=True)
    order_amount =Column(Numeric(20,2), nullable=True)
    direct_good_favorite_count =Column(Integer, nullable=True)
    indirect_good_favorite_count =Column(Integer, nullable=True)
    get_coupon_count =Column(Integer, nullable=True)
    shopping_credit_recharge_count =Column(Integer, nullable=True)
    shopping_credit_recharge_amount =Column(Numeric(20,2), nullable=True)
    wangwang_consult_count =Column(Integer, nullable=True)
    guide_visit_count =Column(Integer, nullable=True)
    guide_visitor_count =Column(Integer, nullable=True)
    guide_visit_potential_customer_count =Column(Integer, nullable=True)
    guide_visit_potential_customer_share =Column(Numeric(10,2), nullable=True)
    new_member_rate =Column(Numeric(10,2), nullable=True)
    new_member_count =Column(Integer, nullable=True)
    guide_visit_rate =Column(Numeric(10,2), nullable=True)
    deep_visit_count =Column(Integer, nullable=True)
    average_page_view_count =Column(Integer, nullable=True)
    trans_user_new_customer_count =Column(Integer, nullable=True)
    trans_user_new_customer_share =Column(Numeric(10,2), nullable=True)
    member_first_purchase_member_count =Column(Integer, nullable=True)
    member_trans_amount =Column(Numeric(20,2), nullable=True)
    member_trans_order_count =Column(Integer, nullable=True)
    trans_user_count =Column(Integer, nullable=True)
    trans_order_count_per_user =Column(Integer, nullable=True)
    trans_amount_per_user =Column(Numeric(20,2), nullable=True)
    trans_amount_form_organic_traffic =Column(Numeric(20,2), nullable=True)
    organic_traffic_impression_count =Column(Integer, nullable=True)


class tmall_flagship_store_ztc_promotion_day(Base):
    __tablename__ = 'tmall_flagship_store_ztc_promotion_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    impression_count =Column(Integer, nullable=True)
    click_count =Column(Integer, nullable=True)
    cost =Column(Numeric(10,2), nullable=True)
    click_through_rate =Column(Numeric(10,2), nullable=True)
    cost_per_click =Column(Numeric(10,2), nullable=True)
    impression_cpm =Column(Numeric(10,2), nullable=True)
    total_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    total_presale_trans_order_count =Column(Integer, nullable=True)
    direct_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    direct_presale_trans_order_count =Column(Integer, nullable=True)
    indirect_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    indirect_presale_trans_order_count =Column(Integer, nullable=True)
    direct_trans_amount =Column(Numeric(20,2), nullable=True)
    indirect_trans_amount =Column(Numeric(20,2), nullable=True)
    total_trans_amount =Column(Numeric(20,2), nullable=True)
    total_trans_order_count =Column(Integer, nullable=True)
    direct_trans_order_count =Column(Integer, nullable=True)
    indirect_trans_order_count =Column(Integer, nullable=True)
    click_conversion_rate =Column(Numeric(10,2), nullable=True)
    input_output_ratio =Column(Numeric(10,2), nullable=True)
    total_trans_cost =Column(Numeric(20,2), nullable=True)
    total_good_add_to_cart_count =Column(Integer, nullable=True)
    direct_good_add_to_cart_count =Column(Integer, nullable=True)
    indirect_good_add_to_cart_count =Column(Integer, nullable=True)
    add_to_cart_rate =Column(Numeric(10,2), nullable=True)
    good_favorite_count =Column(Integer, nullable=True)
    store_favorite_count =Column(Integer, nullable=True)
    store_favorite_cost =Column(Numeric(20,2), nullable=True)
    total_favorite_and_add_to_cart_count =Column(Integer, nullable=True)
    total_favorite_and_add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    good_favorite_and_add_to_cart_count =Column(Integer, nullable=True)
    good_favorite_and_add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    total_favorite_count =Column(Integer, nullable=True)
    good_favorite_cost =Column(Numeric(20,2), nullable=True)
    good_favorite_rate =Column(Numeric(10,2), nullable=True)
    add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    order_count =Column(Integer, nullable=True)
    order_amount =Column(Numeric(20,2), nullable=True)
    direct_good_favorite_count =Column(Integer, nullable=True)
    indirect_good_favorite_count =Column(Integer, nullable=True)
    get_coupon_count =Column(Integer, nullable=True)
    shopping_credit_recharge_count =Column(Integer, nullable=True)
    shopping_credit_recharge_amount =Column(Numeric(20,2), nullable=True)
    wangwang_consult_count =Column(Integer, nullable=True)
    guide_visit_count =Column(Integer, nullable=True)
    guide_visitor_count =Column(Integer, nullable=True)
    guide_visit_potential_customer_count =Column(Integer, nullable=True)
    guide_visit_potential_customer_share =Column(Numeric(10,2), nullable=True)
    new_member_rate =Column(Numeric(10,2), nullable=True)
    new_member_count =Column(Integer, nullable=True)
    guide_visit_rate =Column(Numeric(10,2), nullable=True)
    deep_visit_count =Column(Integer, nullable=True)
    average_page_view_count =Column(Integer, nullable=True)
    trans_user_new_customer_count =Column(Integer, nullable=True)
    trans_user_new_customer_share =Column(Numeric(10,2), nullable=True)
    member_first_purchase_member_count =Column(Integer, nullable=True)
    member_trans_amount =Column(Numeric(20,2), nullable=True)
    member_trans_order_count =Column(Integer, nullable=True)
    trans_user_count =Column(Integer, nullable=True)
    trans_order_count_per_user =Column(Integer, nullable=True)
    trans_amount_per_user =Column(Numeric(20,2), nullable=True)
    trans_amount_form_organic_traffic =Column(Numeric(20,2), nullable=True)
    organic_traffic_impression_count =Column(Integer, nullable=True)


class tmall_flagship_store_ylmf_promotion_day(Base):
    __tablename__ = 'tmall_flagship_store_ylmf_promotion_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    impression_count =Column(Integer, nullable=True)
    click_count =Column(Integer, nullable=True)
    cost =Column(Numeric(10,2), nullable=True)
    click_through_rate =Column(Numeric(10,2), nullable=True)
    cost_per_click =Column(Numeric(10,2), nullable=True)
    impression_cpm =Column(Numeric(10,2), nullable=True)
    total_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    total_presale_trans_order_count =Column(Integer, nullable=True)
    direct_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    direct_presale_trans_order_count =Column(Integer, nullable=True)
    indirect_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    indirect_presale_trans_order_count =Column(Integer, nullable=True)
    direct_trans_amount =Column(Numeric(20,2), nullable=True)
    indirect_trans_amount =Column(Numeric(20,2), nullable=True)
    total_trans_amount =Column(Numeric(20,2), nullable=True)
    total_trans_order_count =Column(Integer, nullable=True)
    direct_trans_order_count =Column(Integer, nullable=True)
    indirect_trans_order_count =Column(Integer, nullable=True)
    click_conversion_rate =Column(Numeric(10,2), nullable=True)
    input_output_ratio =Column(Numeric(10,2), nullable=True)
    total_trans_cost =Column(Numeric(20,2), nullable=True)
    total_good_add_to_cart_count =Column(Integer, nullable=True)
    direct_good_add_to_cart_count =Column(Integer, nullable=True)
    indirect_good_add_to_cart_count =Column(Integer, nullable=True)
    add_to_cart_rate =Column(Numeric(10,2), nullable=True)
    good_favorite_count =Column(Integer, nullable=True)
    store_favorite_count =Column(Integer, nullable=True)
    store_favorite_cost =Column(Numeric(20,2), nullable=True)
    total_favorite_and_add_to_cart_count =Column(Integer, nullable=True)
    total_favorite_and_add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    good_favorite_and_add_to_cart_count =Column(Integer, nullable=True)
    good_favorite_and_add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    total_favorite_count =Column(Integer, nullable=True)
    good_favorite_cost =Column(Numeric(20,2), nullable=True)
    good_favorite_rate =Column(Numeric(10,2), nullable=True)
    add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    order_count =Column(Integer, nullable=True)
    order_amount =Column(Numeric(20,2), nullable=True)
    direct_good_favorite_count =Column(Integer, nullable=True)
    indirect_good_favorite_count =Column(Integer, nullable=True)
    get_coupon_count =Column(Integer, nullable=True)
    shopping_credit_recharge_count =Column(Integer, nullable=True)
    shopping_credit_recharge_amount =Column(Numeric(20,2), nullable=True)
    wangwang_consult_count =Column(Integer, nullable=True)
    guide_visit_count =Column(Integer, nullable=True)
    guide_visitor_count =Column(Integer, nullable=True)
    guide_visit_potential_customer_count =Column(Integer, nullable=True)
    guide_visit_potential_customer_share =Column(Numeric(10,2), nullable=True)
    new_member_rate =Column(Numeric(10,2), nullable=True)
    new_member_count =Column(Integer, nullable=True)
    guide_visit_rate =Column(Numeric(10,2), nullable=True)
    deep_visit_count =Column(Integer, nullable=True)
    average_page_view_count =Column(Integer, nullable=True)
    trans_user_new_customer_count =Column(Integer, nullable=True)
    trans_user_new_customer_share =Column(Numeric(10,2), nullable=True)
    member_first_purchase_member_count =Column(Integer, nullable=True)
    member_trans_amount =Column(Numeric(20,2), nullable=True)
    member_trans_order_count =Column(Integer, nullable=True)
    trans_user_count =Column(Integer, nullable=True)
    trans_order_count_per_user =Column(Integer, nullable=True)
    trans_amount_per_user =Column(Numeric(20,2), nullable=True)
    trans_amount_form_organic_traffic =Column(Numeric(20,2), nullable=True)
    organic_traffic_impression_count =Column(Integer, nullable=True)


class tmall_flagship_store_pxb_promotion_day(Base):
    __tablename__ = 'tmall_flagship_store_pxb_promotion_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    search_volume =Column(Integer, nullable=True)
    impression_count =Column(Integer, nullable=True)
    cost =Column(Numeric(20,2), nullable=True)
    reached_visitor_count =Column(Integer, nullable=True)
    impression_cpm =Column(Numeric(10,2), nullable=True)
    cost_per_click =Column(Numeric(10,2), nullable=True)
    click_count =Column(Integer, nullable=True)
    click_visitor_count =Column(Integer, nullable=True)
    click_through_rate =Column(Numeric(10,2), nullable=True)
    entry_store_visitor_count =Column(Integer, nullable=True)
    store_favorite_count =Column(Integer, nullable=True)
    good_favorite_count =Column(Integer, nullable=True)
    total_good_add_to_cart_count =Column(Integer, nullable=True)
    action_visitor_count =Column(Integer, nullable=True)
    good_add_to_cart_visitor_count =Column(Integer, nullable=True)
    total_trans_order_count =Column(Integer, nullable=True)
    total_trans_amount =Column(Numeric(20,2), nullable=True)
    return_rate =Column(Numeric(10,2), nullable=True)
    conversion_rate =Column(Numeric(10,2), nullable=True)
    organic_traffic_increased_trans_amount =Column(Numeric(20,2), nullable=True)
    good_favorite_and_add_to_cart_count =Column(Integer, nullable=True)


class tmall_flagship_store_own_living_room_situ_day(Base):
    __tablename__ = 'tmall_flagship_store_own_living_room_situ_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    living_trans_amount =Column(Numeric(20,2), nullable=True)
    living_trans_amount_share_of_total =Column(Numeric(10,2), nullable=True)
    living_new_store_customer_count =Column(Integer, nullable=True)
    living_new_follower_count =Column(Integer, nullable=True)
    living_new_member_count =Column(Integer, nullable=True)
    living_member_trans_amount =Column(Numeric(20,2), nullable=True)
    living_trans_user_count =Column(Integer, nullable=True)
    living_trans_member_count =Column(Integer, nullable=True)
    living_trans_good_count =Column(Integer, nullable=True)
    living_member_trans_good_count =Column(Integer, nullable=True)
    living_trans_order_count =Column(Integer, nullable=True)
    living_member_trans_order_count =Column(Integer, nullable=True)
    living_all_good_click_user_count =Column(Integer, nullable=True)
    living_all_good_click_count =Column(Integer, nullable=True)
    living_all_good_add_to_cart_user_count =Column(Integer, nullable=True)
    living_all_good_add_to_cart_count =Column(Integer, nullable=True)


class tmall_flagship_store_livestreamer_living_room_situ_day(Base):
    __tablename__ = 'tmall_flagship_store_livestreamer_living_room_situ_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    living_with_trans_rooms_count =Column(Integer, nullable=True)
    living_trans_amount =Column(Numeric(20,2), nullable=True)
    living_trans_amount_share_of_total =Column(Numeric(10,2), nullable=True)
    living_new_store_customer_count =Column(Integer, nullable=True)
    living_trans_user_count =Column(Integer, nullable=True)
    living_trans_good_count =Column(Integer, nullable=True)
    living_trans_order_count =Column(Integer, nullable=True)
    living_all_good_click_user_count =Column(Integer, nullable=True)
    living_all_good_click_count =Column(Integer, nullable=True)
    living_all_good_add_to_cart_user_count =Column(Integer, nullable=True)
    living_all_good_add_to_cart_count =Column(Integer, nullable=True)


class tmall_flagship_store_livestreamer_living_room_good_day(Base):
    __tablename__ = 'tmall_flagship_store_livestreamer_living_room_good_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    living_name =Column(String(50), nullable=False)
    living_streamer_name =Column(String(50), nullable=False)
    living_start_time =Column(DateTime, nullable=False)
    living_times_id =Column(String(20), nullable=False)
    living_good_id =Column(String(20), nullable=False)
    living_good_name =Column(String(50), nullable=False)
    living_good_main_image_url =Column(String(1000), nullable=False)
    living_good_main_image =Column(String(200), nullable=False)
    living_good_click_user_count =Column(Integer, nullable=True)
    living_good_click_count =Column(Integer, nullable=True)
    living_good_add_to_cart_user_count =Column(Integer, nullable=True)
    living_good_add_to_cart_count =Column(Integer, nullable=True)
    living_good_trans_amount =Column(Numeric(20,2), nullable=True)
    living_good_trans_user_count =Column(Integer, nullable=True)
    living_good_trans_count =Column(Integer, nullable=True)
    living_good_trans_order_count =Column(Integer, nullable=True)


class wxt_cost_top_20_creativity_promotion_day_temp(Base):
    __tablename__ = 'wxt_cost_top_20_creativity_promotion_day_temp'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    creativity_id =Column(String(30), nullable=False)
    creativity_name =Column(String(50), nullable=False)
    entity_id =Column(String(20), nullable=False)
    entity_name =Column(String(50), nullable=False)
    impression_count =Column(Integer, nullable=True)
    click_count =Column(Integer, nullable=True)
    cost =Column(Numeric(10,2), nullable=True)
    click_through_rate =Column(Numeric(10,2), nullable=True)
    cost_per_click =Column(Numeric(10,2), nullable=True)
    impression_cpm =Column(Numeric(10,2), nullable=True)
    total_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    total_presale_trans_order_count =Column(Integer, nullable=True)
    direct_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    direct_presale_trans_order_count =Column(Integer, nullable=True)
    indirect_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    indirect_presale_trans_order_count =Column(Integer, nullable=True)
    direct_trans_amount =Column(Numeric(20,2), nullable=True)
    indirect_trans_amount =Column(Numeric(20,2), nullable=True)
    total_trans_amount =Column(Numeric(20,2), nullable=True)
    total_trans_count =Column(Integer, nullable=True)
    direct_trans_order_count =Column(Integer, nullable=True)
    indirect_trans_order_count =Column(Integer, nullable=True)
    click_conversion_rate =Column(Numeric(10,2), nullable=True)
    input_output_ratio =Column(Numeric(10,2), nullable=True)
    total_trans_cost =Column(Numeric(20,2), nullable=True)
    total_good_add_to_cart_count =Column(Integer, nullable=True)
    direct_good_add_to_cart_count =Column(Integer, nullable=True)
    indirect_good_add_to_cart_count =Column(Integer, nullable=True)
    add_to_cart_rate =Column(Numeric(10,2), nullable=True)
    good_favorite_count =Column(Integer, nullable=True)
    store_favorite_count =Column(Integer, nullable=True)
    store_favorite_cost =Column(Numeric(20,2), nullable=True)
    total_favorite_and_add_to_cart_count =Column(Integer, nullable=True)
    total_favorite_and_add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    good_favorite_and_add_to_cart_count =Column(Integer, nullable=True)
    good_favorite_and_add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    total_favorite_count =Column(Integer, nullable=True)
    good_favorite_cost =Column(Numeric(20,2), nullable=True)
    good_favorite_rate =Column(Numeric(10,2), nullable=True)
    add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    order_count =Column(Integer, nullable=True)
    order_amount =Column(Numeric(20,2), nullable=True)
    direct_good_favorite_count =Column(Integer, nullable=True)
    indirect_good_favorite_count =Column(Integer, nullable=True)
    get_coupon_count =Column(Integer, nullable=True)
    shopping_credit_recharge_count =Column(Integer, nullable=True)
    shopping_credit_recharge_amount =Column(Numeric(20,2), nullable=True)
    wangwang_consult_count =Column(Integer, nullable=True)
    guide_visit_count =Column(Integer, nullable=True)
    guide_visitor_count =Column(Integer, nullable=True)
    guide_visit_potential_customer_count =Column(Integer, nullable=True)
    guide_visit_potential_customer_share =Column(Numeric(10,2), nullable=True)
    new_member_rate =Column(Numeric(10,2), nullable=True)
    new_member_count =Column(Integer, nullable=True)
    guide_visit_rate =Column(Numeric(10,2), nullable=True)
    deep_visit_count =Column(Integer, nullable=True)
    average_page_view_count =Column(Integer, nullable=True)
    trans_user_new_customer_count =Column(Integer, nullable=True)
    trans_user_new_customer_share =Column(Numeric(10,2), nullable=True)
    member_first_purchase_member_count =Column(Integer, nullable=True)
    member_trans_amount =Column(Numeric(20,2), nullable=True)
    member_trans_order_count =Column(Integer, nullable=True)
    trans_user_count =Column(Integer, nullable=True)
    trans_order_count_per_user =Column(Integer, nullable=True)
    trans_amount_per_user =Column(Numeric(20,2), nullable=True)
    roi =Column(Numeric(10,2), nullable=True)


class wxt_creativity_promotion_creativity_img(Base):
    __tablename__ = 'wxt_creativity_promotion_creativity_img'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    creativity_id =Column(String(30), nullable=False)
    creativity_image_url =Column(String(1000), nullable=False)
    creativity_image =Column(String(200), nullable=False)


class pxb_cost_top_20_creativity_promotion_day(Base):
    __tablename__ = 'pxb_cost_top_20_creativity_promotion_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    plan_name =Column(String(50), nullable=False)
    unit_name =Column(String(50), nullable=False)
    creativity_name =Column(String(50), nullable=False)
    creativity_id =Column(String(30), nullable=False)
    impression_count =Column(Integer, nullable=True)
    cost =Column(Numeric(20,2), nullable=True)
    impression_cpm =Column(Numeric(10,2), nullable=True)
    cost_per_click =Column(Numeric(10,2), nullable=True)
    click_count =Column(Integer, nullable=True)
    click_through_rate =Column(Numeric(10,2), nullable=True)
    good_favorite_count =Column(Integer, nullable=True)
    good_add_to_cart_count =Column(Integer, nullable=True)
    trans_order_count =Column(Integer, nullable=True)
    trans_amount =Column(Numeric(20,2), nullable=True)
    return_rate =Column(Numeric(10,2), nullable=True)
    conversion_rate =Column(Numeric(10,2), nullable=True)


class pxb_creativity_promotion_creativity_img(Base):
    __tablename__ = 'pxb_creativity_promotion_creativity_img'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    creativity_id =Column(String(30), nullable=False)
    creativity_image_url =Column(String(1000), nullable=False)
    creativity_image =Column(String(200), nullable=False)


class tmall_flagship_competing_store_gmv_day(Base):
    __tablename__ = 'tmall_flagship_competing_store_gmv_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    competing_store_name =Column(String(50), nullable=False)
    competing_store_gmv =Column(Numeric(20,2), nullable=False)


class tmall_flagship_store_visitors_from_search_word_day(Base):
    __tablename__ = 'tmall_flagship_store_visitors_from_search_word_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    search_word =Column(String(100), nullable=False)
    visitors_count =Column(Integer, nullable=True)
    view_count =Column(Integer, nullable=True)
    bounce_lose_rate =Column(Numeric(10,2), nullable=True)
    guide_order_buyer_count =Column(Integer, nullable=True)
    guide_order_conversion_rate =Column(Numeric(10,2), nullable=True)
    guide_payment_amount =Column(Numeric(20,2), nullable=True)
    guide_payment_good_count =Column(Integer, nullable=True)


class tmall_flagship_competing_store_visitors_from_search_word_day(Base):
    __tablename__ = 'tmall_flagship_competing_store_visitors_from_search_word_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    competing_store_name =Column(String(50), nullable=False)
    search_word =Column(String(100), nullable=True)
    visitors_from_search_word =Column(Numeric(10,2), nullable=True)
    guide_order_buyer_count =Column(Integer, nullable=True)


class dtk_competing_brand_promotion_day(Base):
    __tablename__ = 'dtk_competing_brand_promotion_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    competing_brand_name =Column(String(50), nullable=False)
    competing_store_name =Column(String(50), nullable=False)
    promotion_link =Column(String(200), nullable=False)
    promotion_main_image =Column(String(200), nullable=False)
    promotion_main_image_url =Column(String(1000), nullable=False)
    coupon_amount =Column(Numeric(20,2), nullable=False)
    price_after_coupon =Column(Numeric(10,2), nullable=False)
    commission_rate =Column(Numeric(10,2), nullable=False)
    wechat_promotion_copy =Column(String(1000), nullable=False)
    community_name =Column(String(20), nullable=False)
    good_link =Column(String(200), nullable=False)
    today_sale_count =Column(String(20), nullable=False)


class pop_purpop_exppop_month(Base):
    __tablename__ = 'pop_purpop_exppop_month'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    month =Column(String(20), nullable=False)
    begin_date =Column(String(20), nullable=False)
    end_date =Column(String(20), nullable=False)
    paid_type =Column(String(20), nullable=True)
    fee_z =Column(Numeric(20,2), nullable=True)
    fee_y =Column(Numeric(20,2), nullable=True)
    fee_w =Column(Numeric(20,2), nullable=True)
    fee_p =Column(Numeric(20,2), nullable=True)
    purpop =Column(Integer, nullable=True)
    inc_A_pop_act =Column(Integer, nullable=True)
    inc_I_pop_act =Column(Integer, nullable=True)
    inc_PL_pop_act =Column(Integer, nullable=True)
    inc_A_purpop_act =Column(Integer, nullable=True)
    inc_I_purpop_act =Column(Integer, nullable=True)
    inc_PL_purpop_act =Column(Integer, nullable=True)
    inc_A_z_exppop_act =Column(Integer, nullable=True)
    inc_A_y_exppop_act =Column(Integer, nullable=True)
    inc_A_w_exppop_act =Column(Integer, nullable=True)
    inc_A_p_exppop_act =Column(Integer, nullable=True)
    inc_A_paid_exppop_act =Column(Integer, nullable=True)
    inc_I_z_exppop_act =Column(Integer, nullable=True)
    inc_I_y_exppop_act =Column(Integer, nullable=True)
    inc_I_w_exppop_act =Column(Integer, nullable=True)
    inc_I_p_exppop_act =Column(Integer, nullable=True)
    inc_I_paid_exppop_act =Column(Integer, nullable=True)
    inc_PL_z_exppop_act =Column(Integer, nullable=True)
    inc_PL_y_exppop_act =Column(Integer, nullable=True)
    inc_PL_w_exppop_act =Column(Integer, nullable=True)
    inc_PL_p_exppop_act =Column(Integer, nullable=True)
    inc_PL_paid_exppop_act =Column(Integer, nullable=True)
    his_A_interact_pop_stofirstday =Column(Integer, nullable=True)
    his_A_nointeract_pop_stofirstday =Column(Integer, nullable=True)
    his_I_interact_pop_stofirstday =Column(Integer, nullable=True)
    his_I_nointeract_pop_stofirstday =Column(Integer, nullable=True)
    his_PL_interact_pop_stofirstday =Column(Integer, nullable=True)
    his_PL_nointeract_pop_stofirstday =Column(Integer, nullable=True)
    his_A_interact_pop_sto =Column(Integer, nullable=True)
    his_A_nointeract_pop_sto =Column(Integer, nullable=True)
    his_I_interact_pop_sto =Column(Integer, nullable=True)
    his_I_nointeract_pop_sto =Column(Integer, nullable=True)
    his_PL_interact_pop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_pop_sto =Column(Integer, nullable=True)
    his_A_interact_purpop_sto =Column(Integer, nullable=True)
    his_A_nointeract_purpop_sto =Column(Integer, nullable=True)
    his_I_interact_purpop_sto =Column(Integer, nullable=True)
    his_I_nointeract_purpop_sto =Column(Integer, nullable=True)
    his_PL_interact_purpop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_purpop_sto =Column(Integer, nullable=True)
    his_A_interact_z_exppop_sto =Column(Integer, nullable=True)
    his_A_nointeract_z_exppop_sto =Column(Integer, nullable=True)
    his_A_interact_y_exppop_sto =Column(Integer, nullable=True)
    his_A_nointeract_y_exppop_sto =Column(Integer, nullable=True)
    his_A_interact_w_exppop_sto =Column(Integer, nullable=True)
    his_A_nointeract_w_exppop_sto =Column(Integer, nullable=True)
    his_A_interact_p_exppop_sto =Column(Integer, nullable=True)
    his_A_nointeract_p_exppop_sto =Column(Integer, nullable=True)
    his_A_interact_paid_exppop_sto =Column(Integer, nullable=True)
    his_A_nointeract_paid_exppop_sto =Column(Integer, nullable=True)
    his_I_interact_z_exppop_sto =Column(Integer, nullable=True)
    his_I_nointeract_z_exppop_sto =Column(Integer, nullable=True)
    his_I_interact_y_exppop_sto =Column(Integer, nullable=True)
    his_I_nointeract_y_exppop_sto =Column(Integer, nullable=True)
    his_I_interact_w_exppop_sto =Column(Integer, nullable=True)
    his_I_nointeract_w_exppop_sto =Column(Integer, nullable=True)
    his_I_interact_p_exppop_sto =Column(Integer, nullable=True)
    his_I_nointeract_p_exppop_sto =Column(Integer, nullable=True)
    his_I_interact_paid_exppop_sto =Column(Integer, nullable=True)
    his_I_nointeract_paid_exppop_sto =Column(Integer, nullable=True)
    his_PL_interact_z_exppop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_z_exppop_sto =Column(Integer, nullable=True)
    his_PL_interact_y_exppop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_y_exppop_sto =Column(Integer, nullable=True)
    his_PL_interact_w_exppop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_w_exppop_sto =Column(Integer, nullable=True)
    his_PL_interact_p_exppop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_p_exppop_sto =Column(Integer, nullable=True)
    his_PL_interact_paid_exppop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_paid_exppop_sto =Column(Integer, nullable=True)


class pop_purpop_exppop_bigpromo(Base):
    __tablename__ = 'pop_purpop_exppop_bigpromo'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    big_promo_year =Column(Integer, nullable=False)
    big_promo_name =Column(String(20), nullable=False)
    sto_begindate =Column(String(20), nullable=False)
    sto_enddate =Column(String(20), nullable=False)
    act_begindate =Column(String(20), nullable=False)
    act_enddate =Column(String(20), nullable=False)
    paid_type_sto =Column(String(20), nullable=True)
    paid_type =Column(String(20), nullable=True)
    fee_z_sto =Column(Numeric(20,2), nullable=True)
    fee_y_sto =Column(Numeric(20,2), nullable=True)
    fee_w_sto =Column(Numeric(20,2), nullable=True)
    fee_p_sto =Column(Numeric(20,2), nullable=True)
    fee_z =Column(Numeric(20,2), nullable=True)
    fee_y =Column(Numeric(20,2), nullable=True)
    fee_w =Column(Numeric(20,2), nullable=True)
    fee_p =Column(Numeric(20,2), nullable=True)
    purpop =Column(Integer, nullable=True)
    inc_A_pop_act =Column(Integer, nullable=True)
    inc_I_pop_act =Column(Integer, nullable=True)
    inc_PL_pop_act =Column(Integer, nullable=True)
    inc_A_purpop_act =Column(Integer, nullable=True)
    inc_I_purpop_act =Column(Integer, nullable=True)
    inc_PL_purpop_act =Column(Integer, nullable=True)
    inc_A_z_exppop_act =Column(Integer, nullable=True)
    inc_A_y_exppop_act =Column(Integer, nullable=True)
    inc_A_w_exppop_act =Column(Integer, nullable=True)
    inc_A_p_exppop_act =Column(Integer, nullable=True)
    inc_A_paid_exppop_act =Column(Integer, nullable=True)
    inc_I_z_exppop_act =Column(Integer, nullable=True)
    inc_I_y_exppop_act =Column(Integer, nullable=True)
    inc_I_w_exppop_act =Column(Integer, nullable=True)
    inc_I_p_exppop_act =Column(Integer, nullable=True)
    inc_I_paid_exppop_act =Column(Integer, nullable=True)
    inc_PL_z_exppop_act =Column(Integer, nullable=True)
    inc_PL_y_exppop_act =Column(Integer, nullable=True)
    inc_PL_w_exppop_act =Column(Integer, nullable=True)
    inc_PL_p_exppop_act =Column(Integer, nullable=True)
    inc_PL_paid_exppop_act =Column(Integer, nullable=True)
    his_A_interact_pop_stofirstday =Column(Integer, nullable=True)
    his_A_nointeract_pop_stofirstday =Column(Integer, nullable=True)
    his_I_interact_pop_stofirstday =Column(Integer, nullable=True)
    his_I_nointeract_pop_stofirstday =Column(Integer, nullable=True)
    his_PL_interact_pop_stofirstday =Column(Integer, nullable=True)
    his_PL_nointeract_pop_stofirstday =Column(Integer, nullable=True)
    his_A_interact_pop_sto =Column(Integer, nullable=True)
    his_A_nointeract_pop_sto =Column(Integer, nullable=True)
    his_I_interact_pop_sto =Column(Integer, nullable=True)
    his_I_nointeract_pop_sto =Column(Integer, nullable=True)
    his_PL_interact_pop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_pop_sto =Column(Integer, nullable=True)
    his_A_interact_purpop_sto =Column(Integer, nullable=True)
    his_A_nointeract_purpop_sto =Column(Integer, nullable=True)
    his_I_interact_purpop_sto =Column(Integer, nullable=True)
    his_I_nointeract_purpop_sto =Column(Integer, nullable=True)
    his_PL_interact_purpop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_purpop_sto =Column(Integer, nullable=True)
    his_A_interact_z_exppop_sto =Column(Integer, nullable=True)
    his_A_nointeract_z_exppop_sto =Column(Integer, nullable=True)
    his_A_interact_y_exppop_sto =Column(Integer, nullable=True)
    his_A_nointeract_y_exppop_sto =Column(Integer, nullable=True)
    his_A_interact_w_exppop_sto =Column(Integer, nullable=True)
    his_A_nointeract_w_exppop_sto =Column(Integer, nullable=True)
    his_A_interact_p_exppop_sto =Column(Integer, nullable=True)
    his_A_nointeract_p_exppop_sto =Column(Integer, nullable=True)
    his_A_interact_paid_exppop_sto =Column(Integer, nullable=True)
    his_A_nointeract_paid_exppop_sto =Column(Integer, nullable=True)
    his_I_interact_z_exppop_sto =Column(Integer, nullable=True)
    his_I_nointeract_z_exppop_sto =Column(Integer, nullable=True)
    his_I_interact_y_exppop_sto =Column(Integer, nullable=True)
    his_I_nointeract_y_exppop_sto =Column(Integer, nullable=True)
    his_I_interact_w_exppop_sto =Column(Integer, nullable=True)
    his_I_nointeract_w_exppop_sto =Column(Integer, nullable=True)
    his_I_interact_p_exppop_sto =Column(Integer, nullable=True)
    his_I_nointeract_p_exppop_sto =Column(Integer, nullable=True)
    his_I_interact_paid_exppop_sto =Column(Integer, nullable=True)
    his_I_nointeract_paid_exppop_sto =Column(Integer, nullable=True)
    his_PL_interact_z_exppop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_z_exppop_sto =Column(Integer, nullable=True)
    his_PL_interact_y_exppop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_y_exppop_sto =Column(Integer, nullable=True)
    his_PL_interact_w_exppop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_w_exppop_sto =Column(Integer, nullable=True)
    his_PL_interact_p_exppop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_p_exppop_sto =Column(Integer, nullable=True)
    his_PL_interact_paid_exppop_sto =Column(Integer, nullable=True)
    his_PL_nointeract_paid_exppop_sto =Column(Integer, nullable=True)


class dy_competing_brand_gmv_day(Base):
    __tablename__ = 'dy_competing_brand_gmv_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    competing_brand_name =Column(String(50), nullable=False)
    competing_brand_gmv =Column(Numeric(20,2), nullable=False)


class dy_flagship_store_living_room_day(Base):
    __tablename__ = 'dy_flagship_store_living_room_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    sixty_nine_code =Column(String(20), nullable=True)
    living_service_fee =Column(Numeric(20,2), nullable=True)
    living_commission =Column(Numeric(20,2), nullable=True)
    livestreamer_avatar_link =Column(String(1000), nullable=True)
    livestreamer_name =Column(String(50), nullable=True)
    livestreamer_douyin_id =Column(String(20), nullable=True)
    living_start_time =Column(DateTime, nullable=True)
    living_end_time =Column(DateTime, nullable=True)
    living_duration =Column(Numeric(10,2), nullable=True)
    living_impression_user_count =Column(Integer, nullable=True)
    living_impression_count =Column(Integer, nullable=True)
    living_viewer_count =Column(Integer, nullable=True)
    living_hourly_viewer_count =Column(Integer, nullable=True)
    living_view_count =Column(Integer, nullable=True)
    living_max_online_user_count =Column(Integer, nullable=True)
    living_average_online_user_count =Column(Integer, nullable=True)
    living_average_view_duration_minutes =Column(Numeric(10,2), nullable=True)
    living_comment_count =Column(Integer, nullable=True)
    living_new_living_group_member_count =Column(Integer, nullable=True)
    livestreamer_new_follower_count =Column(Integer, nullable=True)
    livestreamer_unfollowed_follower_count =Column(Integer, nullable=True)
    living_old_followers_share_of_viewers =Column(Numeric(10,2), nullable=True)
    living_all_goods_count =Column(Integer, nullable=True)
    living_all_goods_impression_user_count =Column(Integer, nullable=True)
    living_all_goods_click_user_count =Column(Integer, nullable=True)
    living_all_goods_impression_count =Column(Integer, nullable=True)
    living_all_goods_click_count =Column(Integer, nullable=True)
    living_all_goods_trans_count =Column(Integer, nullable=True)
    living_all_goods_trans_amount =Column(Numeric(20,2), nullable=True)
    living_all_goods_hourly_gmv =Column(Numeric(20,2), nullable=True)
    living_all_goods_trans_good_count =Column(Integer, nullable=True)
    living_all_goods_trans_user_count =Column(Integer, nullable=True)
    living_all_goods_refund_order_count =Column(Integer, nullable=True)
    living_all_goods_refund_amount =Column(Numeric(20,2), nullable=True)
    living_all_goods_refund_user_count =Column(Integer, nullable=True)
    living_estimated_commission_cost =Column(Numeric(20,2), nullable=True)
    living_all_goods_impression_to_click__count_rate =Column(Numeric(10,2), nullable=True)
    living_all_goods_impression_to_click_users_rate =Column(Numeric(10,2), nullable=True)
    living_all_goods_click_to_trans_count_rate =Column(Numeric(10,2), nullable=True)
    living_all_goods_click_to_trans_users_rate =Column(Numeric(10,2), nullable=True)
    living_all_goods_view_to_trans_count_rate =Column(Numeric(10,2), nullable=True)
    living_all_goods_view_to_trans_users_rate =Column(Numeric(10,2), nullable=True)
    living_all_goods_preorder_order_count =Column(Integer, nullable=True)
    living_all_goods_preorder_full_payment_amount =Column(Numeric(20,2), nullable=True)
    living_new_shopping_group_user_count =Column(Integer, nullable=True)

class plan_month(Base):
    __tablename__ = 'plan_month'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    stat_time =Column(String(10), nullable=True)
    customer_code =Column(String(50), nullable=True)
    store_name =Column(String(50), nullable=True)
    platform_name =Column(String(50), nullable=True)
    attribute =Column(String(10), nullable=True)
    brand_name =Column(String(50), nullable=True)
    plan_amount =Column(Numeric(20,2), nullable=True)


class deliver_sale_bag_month(Base):
    __tablename__ = 'deliver_sale_bag_month'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    stat_time =Column(String(10), nullable=False)
    material_code =Column(String(50), nullable=True)
    customer_code =Column(String(50), nullable=True)
    deliver_amount =Column(Numeric(20,2), nullable=True)
    A_price_amount =Column(Numeric(20,2), nullable=True)


class deliver_sale_month(Base):
    __tablename__ = 'deliver_sale_month'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    stat_time =Column(String(10), nullable=False)
    material_code =Column(String(50), nullable=True)
    customer_code =Column(String(50), nullable=True)
    deliver_amount =Column(Numeric(20,2), nullable=True)
    A_price_amount =Column(Numeric(20,2), nullable=True)


class product_information(Base):
    __tablename__ = 'product_information'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    material_code =Column(String(50), nullable=True)
    brand_name =Column(String(50), nullable=True)
    parent_series =Column(String(50), nullable=True)
    child_series =Column(String(50), nullable=True)


class customer_information(Base):
    __tablename__ = 'customer_information'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    upload_time =Column(DateTime, nullable=False)
    customer_code =Column(String(50), nullable=True)
    store_name =Column(String(50), nullable=True)
    attribute =Column(String(50), nullable=True)












class tmall_flagship_store_order_hour(Base):
    __tablename__ = 'tmall_flagship_store_order_hour'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(String(50), nullable=False)
    order_number =Column(String(30), nullable=False)
    order_creation_time =Column(DateTime, nullable=False)
    good_name =Column(String(50), nullable=False)
    good_id =Column(String(20), nullable=False)
    good_link =Column(String(200), nullable=False)
    good_main_image =Column(String(200), nullable=True)
    good_main_image_url =Column(String(1000), nullable=True)
    sixty_nine_code =Column(String(20), nullable=False)
    good_actual_price =Column(Numeric(10,2), nullable=False)
    good_trans_count =Column(Integer, nullable=False)
    good_series =Column(String(50), nullable=True)
    good_product_combination =Column(String(500), nullable=True)
    good_giveaway_item_combination =Column(String(500), nullable=True)
    good_giveaway_item_price =Column(Numeric(10,2), nullable=True)
    good_pack_count =Column(Integer, nullable=True)
    good_total_pieces =Column(Integer, nullable=True)
    good_retail_price =Column(Numeric(10,2), nullable=True)
    good_initial_price =Column(Numeric(10,2), nullable=True)
    good_giveaway_item_price_ratio =Column(Numeric(10,2), nullable=True)
    good_big_promotion_price =Column(Numeric(10,2), nullable=True)
    good_small_promotion_price =Column(Numeric(10,2), nullable=True)


class tmall_flagship_store_good_price_sales_hour(Base):
    __tablename__ = 'tmall_flagship_store_good_price_sales_hour'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(String(50), nullable=False)
    sixty_nine_code =Column(String(20), nullable=False)
    good_id =Column(String(20), nullable=False)
    good_name =Column(String(50), nullable=False)
    good_link =Column(String(200), nullable=False)
    good_main_image =Column(String(200), nullable=True)
    good_main_image_url =Column(String(1000), nullable=True)
    good_trans_count =Column(Integer, nullable=False)
    good_min_actual_price =Column(Numeric(10,2), nullable=False)
    good_max_actual_price =Column(Numeric(10,2), nullable=False)
    good_mean_actual_price =Column(Numeric(10,2), nullable=False)
    good_sales_change =Column(Integer, nullable=False)
    good_min_actual_price_change =Column(Numeric(10,2), nullable=False)
    good_max_actual_price_change =Column(Numeric(10,2), nullable=False)
    good_mean_actual_price_change =Column(Numeric(10,2), nullable=False)


class tmall_flagship_store_overview_day(Base):
    __tablename__ = 'tmall_flagship_store_overview_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    new_member_count =Column(Integer, nullable=True)
    member_trans_amount =Column(Numeric(20,2), nullable=True)
    gmv =Column(Numeric(20,2), nullable=True)
    refund_amount =Column(Numeric(20,2), nullable=True)
    user_value =Column(Numeric(10,2), nullable=True)
    payment_conversion_rate =Column(Numeric(10,2), nullable=True)
    payment_buyer_count =Column(Integer, nullable=True)
    avg_order_price =Column(Numeric(10,2), nullable=True)
    good_favorite_user_count =Column(Integer, nullable=True)
    good_add_to_cart_user_count =Column(Integer, nullable=True)
    gmv_old_buyer =Column(Numeric(20,2), nullable=True)
    gmv_new_buyer =Column(Numeric(20,2), nullable=True)
    payment_old_buyer_count =Column(Integer, nullable=True)
    paying_new_buyer_count =Column(Integer, nullable=True)
    tk_gmv =Column(Numeric(20,2), nullable=True)
    livestreamer_living_gmv =Column(Numeric(20,2), nullable=True)
    promotion_gmv =Column(Numeric(20,2), nullable=True)
    own_living_gmv =Column(Numeric(20,2), nullable=True)
    tk_promotion_cost =Column(Numeric(20,2), nullable=True)
    promotion_cost =Column(Numeric(20,2), nullable=True)
    visitor_count =Column(Integer, nullable=True)



class tmall_flagship_store_four_promotions_sum_day(Base):
    __tablename__ = 'tmall_flagship_store_four_promotions_sum_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    impression_count =Column(Integer, nullable=True)
    click_count =Column(Integer, nullable=True)
    cost =Column(Numeric(20,2), nullable=True)
    total_trans_order_count =Column(Integer, nullable=True)
    total_trans_amount =Column(Numeric(20,2), nullable=True)
    cost_per_click =Column(Numeric(10,2), nullable=True)
    conversion_rate =Column(Numeric(10,2), nullable=True)
    user_value =Column(Numeric(10,2), nullable=True)


class wxt_cost_top_20_creativity_promotion_day(Base):
    __tablename__ = 'wxt_cost_top_20_creativity_promotion_day'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(Date, nullable=False)
    creativity_id =Column(String(30), nullable=False)
    creativity_name =Column(String(50), nullable=False)
    entity_id =Column(String(20), nullable=False)
    entity_kind =Column(String(20), nullable=False)
    entity_name =Column(String(50), nullable=False)
    sixty_nine_code =Column(String(20), nullable=True)
    good_series =Column(String(50), nullable=True)
    good_product_combination =Column(String(500), nullable=True)
    actual_price =Column(Numeric(10,2), nullable=True)
    impression_count =Column(Integer, nullable=True)
    click_count =Column(Integer, nullable=True)
    cost =Column(Numeric(10,2), nullable=True)
    click_through_rate =Column(Numeric(10,2), nullable=True)
    click_conversion_rate =Column(Numeric(10,2), nullable=True)
    total_trans_amount =Column(Numeric(20,2), nullable=True)
    roi =Column(Numeric(10,2), nullable=True)
    cost_per_click =Column(Numeric(10,2), nullable=True)
    impression_cpm =Column(Numeric(10,2), nullable=True)
    total_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    total_presale_trans_order_count =Column(Integer, nullable=True)
    direct_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    direct_presale_trans_order_count =Column(Integer, nullable=True)
    indirect_presale_trans_amount =Column(Numeric(20,2), nullable=True)
    indirect_presale_trans_order_count =Column(Integer, nullable=True)
    direct_trans_amount =Column(Numeric(20,2), nullable=True)
    indirect_trans_amount =Column(Numeric(20,2), nullable=True)
    total_trans_count =Column(Integer, nullable=True)
    direct_trans_order_count =Column(Integer, nullable=True)
    indirect_trans_order_count =Column(Integer, nullable=True)
    input_output_ratio =Column(Numeric(10,2), nullable=True)
    total_trans_cost =Column(Numeric(20,2), nullable=True)
    total_good_add_to_cart_count =Column(Integer, nullable=True)
    direct_good_add_to_cart_count =Column(Integer, nullable=True)
    indirect_good_add_to_cart_count =Column(Integer, nullable=True)
    add_to_cart_rate =Column(Numeric(10,2), nullable=True)
    good_favorite_count =Column(Integer, nullable=True)
    store_favorite_count =Column(Integer, nullable=True)
    store_favorite_cost =Column(Numeric(20,2), nullable=True)
    total_favorite_and_add_to_cart_count =Column(Integer, nullable=True)
    total_favorite_and_add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    good_favorite_and_add_to_cart_count =Column(Integer, nullable=True)
    good_favorite_and_add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    total_favorite_count =Column(Integer, nullable=True)
    good_favorite_cost =Column(Numeric(20,2), nullable=True)
    good_favorite_rate =Column(Numeric(10,2), nullable=True)
    add_to_cart_cost =Column(Numeric(20,2), nullable=True)
    order_count =Column(Integer, nullable=True)
    order_amount =Column(Numeric(20,2), nullable=True)
    direct_good_favorite_count =Column(Integer, nullable=True)
    indirect_good_favorite_count =Column(Integer, nullable=True)
    get_coupon_count =Column(Integer, nullable=True)
    shopping_credit_recharge_count =Column(Integer, nullable=True)
    shopping_credit_recharge_amount =Column(Numeric(20,2), nullable=True)
    wangwang_consult_count =Column(Integer, nullable=True)
    guide_visit_count =Column(Integer, nullable=True)
    guide_visitor_count =Column(Integer, nullable=True)
    guide_visit_potential_customer_count =Column(Integer, nullable=True)
    guide_visit_potential_customer_share =Column(Numeric(10,2), nullable=True)
    new_member_rate =Column(Numeric(10,2), nullable=True)
    new_member_count =Column(Integer, nullable=True)
    guide_visit_rate =Column(Numeric(10,2), nullable=True)
    deep_visit_count =Column(Integer, nullable=True)
    average_page_view_count =Column(Integer, nullable=True)
    trans_user_new_customer_count =Column(Integer, nullable=True)
    trans_user_new_customer_share =Column(Numeric(10,2), nullable=True)
    member_first_purchase_member_count =Column(Integer, nullable=True)
    member_trans_amount =Column(Numeric(20,2), nullable=True)
    member_trans_order_count =Column(Integer, nullable=True)
    trans_user_count =Column(Integer, nullable=True)
    trans_order_count_per_user =Column(Integer, nullable=True)
    trans_amount_per_user =Column(Numeric(20,2), nullable=True)


class tmall_flagship_store_market_gmv_month(Base):
    __tablename__ = 'tmall_flagship_store_market_gmv_month'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    crawl_time =Column(DateTime, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(String(20), nullable=False)
    market_gmv =Column(Numeric(20,2), nullable=False)
    last_year_same_period_gmv =Column(Numeric(20,2), nullable=True)
    gmv_yoy_growth =Column(Numeric(10,2), nullable=True)
    cumulative_gmv =Column(Numeric(20,2), nullable=True)
    last_year_same_period_cumulative_gmv =Column(Numeric(20,2), nullable=True)
    cumulative_gmv_yoy_growth =Column(Numeric(10,2), nullable=True)


class tmall_flagship_store_competing_store_gmv_month(Base):
    __tablename__ = 'tmall_flagship_store_competing_store_gmv_month'
    id =Column(BigInteger, primary_key=True, autoincrement=True, nullable=False)
    create_time =Column(DateTime, nullable=False)
    stat_time =Column(String(20), nullable=False)
    competing_store_name =Column(String(20), nullable=False)
    competing_store_gmv =Column(Numeric(20,2), nullable=False)
    last_year_same_period_gmv =Column(Numeric(20,2), nullable=True)
    gmv_yoy_growth =Column(Numeric(10,2), nullable=True)
    cumulative_gmv =Column(Numeric(20,2), nullable=True)
    last_year_same_period_cumulative_gmv =Column(Numeric(20,2), nullable=True)
    cumulative_gmv_yoy_growth =Column(Numeric(10,2), nullable=True)
